| Time | Content |
|---|---|
| 10:00–10:30 | Drawing plots with ggplot2 |
| 10:30–11:00 | Exercise 1 |
| 11:00–11:30 | The Grammar of Graphics |
| 11:30–12:00 | Exercise 2 |
| 12:00–12:10 | Break |
| 12:10–12:30 | Drawing multiple layers with ggplot2 |
| 12:30–12:50 | Exercise 3 |
| 12:50–13:00 | Wrap up |
ANU BDSI
workshop Data Visualisation with R Part 1
Biological Data Science Institute
10th April 2024
https://emitanaka.org @statsgen fosstodon.org/@emitanaka
All materials will be hosted at
https://anu-bdsi.github.io/workshop-data-vis-R1/
| Time | Content |
|---|---|
| 10:00–10:30 | Drawing plots with ggplot2 |
| 10:30–11:00 | Exercise 1 |
| 11:00–11:30 | The Grammar of Graphics |
| 11:30–12:00 | Exercise 2 |
| 12:00–12:10 | Break |
| 12:10–12:30 | Drawing multiple layers with ggplot2 |
| 12:30–12:50 | Exercise 3 |
| 12:50–13:00 | Wrap up |
ggplot2
ggplot2
ggplot2ggplot2
ggplot2
ggplot2
ggplot2 R package (as part of his PhD project)ggplot2 is widely used in the scientific literature and even in newspapers!plotnine), Julia (e.g., VegaLite.jl), and JavaScript (e.g., Vega).
geom_bar()geom_col()geom_point()geom_tile()geom_density()geom_bar() with a categorical variablestat = "count" is computing the frequencies for each category for you.geom_bar() with a discrete numerical variablex = factor(year).geom_col()stat = "count" to do the counting for you and use geom_col() instead.geom_bar(stat = "identity") where stat = "identity" means that you will take the value as supplied without any statistical transformation."stack""dodge""dodge" = position_dodge()"dodge2""dodge2" uses a different algorithm to recalculate the x-values with an option to add a padding between geometric objects"fill"x, then position = "fill" can be handy.30:00 anu-bdsi.github.io/workshop-data-vis-R1/